<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件案例</title>
    <style>
        body{
            height: 3000px;
        }
        .item{
            width: 300px;
            height: 300px;
            background-color: azure;
        }
    </style>
</head>
<body>
    <div class="item">
        123132123
    </div>
    <a href="https://www.baidu.com">链接</a>
    <form action="">
        <button class="btn">
            提交
        </button>
    </form>
    <script>
        let item =document.querySelector(".item");
        let a=document.querySelector("a");
        let btn=document.querySelector(".btn");
        item.onwheel=(e)=>{
            e.preventDefault();
            console.log(1);
        }
        item.oncontextmenu=(e)=>{
            e.preventDefault();
            console.log(2);
        }
        item.onmousedown=(e)=>{
            e.preventDefault();
            console.log(3);
        }
        a.onclick=(e)=>{
            e.preventDefault();
            console.log(4);
        }
        btn.onclick=(e)=>{
            e.preventDefault();
            console.log(5);
        }
    </script>
</body>
</html>